import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';
import success from '@dfeidao/atom-web/msgbox/success';
export default async function a008(fd: IFeidaoAiBrowserComponent, e: Event) {
	// todo  倒计时开始
	const fdTest = document.querySelector('#fd-wh000014-001');
	fdTest.start();
	const dtTime = get(fd, 'dtTime');
	// tslint:disable-next-line: variable-name
	let Time = dtTime[0].exam_time - 2;
	// tslint:disable-next-line: only-arrow-functions
	setInterval(function() {
		if (Time === 0) {
			fire('zj-000003', 'a004');
		} else {
			Time--;
		}
	}, 1000);
}
